package com.autoEcole.dao.util;

import com.autoEcole.dao.*;


public class DAOFactory implements AbstractDAOFactory {

	/**
	 * AbstractDAOFactory instance
	 */
	private static DAOFactory factory;

	/**
	 * Non instantiable constructor.
	 * 
	 */
	private DAOFactory() {
		// Non instantiable constructor.
	}

	/**
	 * This method implements a Singleton wich allows to construct the unique
	 * instance of the class <code>DAOFactory</code>.
	 * 
	 * @return the unique instance of the class <code>DAOFactory</code>.
	 */
	public static synchronized DAOFactory getInstance() {
		if (factory == null)
			factory = new DAOFactory();
		return factory;
	}
	
	public CoursDAO getCoursDAO() {
		CoursDAO coursDAO = CoursDAO.getInstance();
		return coursDAO;
	}

	public DatePermisDAO getDatePermisDAO() {
		DatePermisDAO datePermisDAO = DatePermisDAO.getInstance();
		return datePermisDAO;
	}
	
	public DocumentDAO getDocumentDAO() {
		DocumentDAO documentDAO = DocumentDAO.getInstance();
		return documentDAO;
	}
	
	public EleveDAO getEleveDAO() {
		EleveDAO eleveDAO = EleveDAO.getInstance();
		return eleveDAO;
	}
	
	public EleveExamenDAO getEleveExamenDAO() {
		EleveExamenDAO eleveExamenDAO = EleveExamenDAO.getInstance();
		return eleveExamenDAO;
	}
	
	public EmployeeDAO getEmployeeDAO() {
		EmployeeDAO employeeDAO = EmployeeDAO.getInstance();
		return employeeDAO;
	}
	
	public EtatDAO getEtatDAO() {
		EtatDAO etatDAO = EtatDAO.getInstance();
		return etatDAO;
	}
	
	public ExamenDAO getExamenDAO() {
		ExamenDAO examenDAO = ExamenDAO.getInstance();
		return examenDAO;
	}
	
	public ExaminateurDAO getExaminateurDAO() {
		ExaminateurDAO examinateurDAO = ExaminateurDAO.getInstance();
		return examinateurDAO;
	}
	
	public FonctionDAO getFonctionDAO() {
		FonctionDAO fonctionDAO = FonctionDAO.getInstance();
		return fonctionDAO;
	}
	
	public LeconDAO getLeconDAO() {
		LeconDAO leconDAO = LeconDAO.getInstance();
		return leconDAO;
	}
	
	public PermisDAO getPermisDAO() {
		PermisDAO permisDAO = PermisDAO.getInstance();
		return permisDAO;
	}
	
	public ResultatDAO getResultatDAO() {
		ResultatDAO resultatDAO = ResultatDAO.getInstance();
		return resultatDAO;
	}	
	
	public VehiculeDAO getVehiculeDAO() {
		VehiculeDAO vehiculeDAO = VehiculeDAO.getInstance();
		return vehiculeDAO;
	}

}
